{% extends 'layout.html' %}

{% block main %}
<ol class="breadcrumb">
    <li><a href="/admin">管理首页</a></li>
    <li class="active">添加内容</li>
</ol>

<h1 class="page-header">添加内容</h1>

<form method="POST">

    <div class="form-group">
        <label for="category">所属分类</label>
        <select class="form-control" name="category" id="category">
            {% for category in categories %}
            <option value="{{category._id.toString()}}">{{category.name}}</option>
            {% endfor %}
        </select>
    </div>

    <div class="form-group">
        <label for="title">内容标题：</label>
        <input type="text" class="form-control" id="title" name="title" placeholder="请输入内容标题">
    </div>

    <div class="form-group">
        <label for="description">简介：</label>
        <input type="text" class="form-control" id="description" name="description" placeholder="请输入内容简介">
    </div>

    <div class="form-group">
        <label for="content">内容：</label>
        <textarea class="form-control" name="content" id="content" cols="30" rows="10" placeholder="请输入内容"></textarea>
    </div>
    <button type="submit" class="btn btn-default">Submit</button>
</form>

{% endblock %}